Skip to content

feat(esp32): #83 brownout defense-in-depth (PHY TX backoff + connectivity log) - #94

Merged
AndrewDemsDS merged 1 commit into
mainfrom
fix/83-brownout-defense
Jul 23, 2026
Merged

feat(esp32): #83 brownout defense-in-depth (PHY TX backoff + connectivity log)#94
AndrewDemsDS merged 1 commit into
mainfrom
fix/83-brownout-defense

Conversation

@AndrewDemsDS

Copy link
Copy Markdown
Owner

Two landable firmware levers for the node 35 brownout crash-loop (#83). Neither reduces the initial phy_init calibration peak that trips the reset (only the bulk cap / custom PCB #11 does) — belt-and-suspenders, not the fix.

Changes

  1. CONFIG_ESP_PHY_REDUCE_TX_POWER=y (sdkconfig.defaults, grouped with the brownout block). IDF-native, no code: esp_phy_reduce_tx_power() forces the lowest PHY TX power on the boot immediately after ESP_RST_BROWNOUT (phy_init.c gates it on exactly that reset reason). Post-brownout backoff on the retry boot.
  2. Wi-Fi connectivity-transition logger (app_main.cpp). Originally scoped as a runtime reconnect backoff via SetWiFiStationReconnectInterval, but esp-matter's ESP32 ConnectivityManagerImpl declares that setter without defining it (only _Get links; the interval is a fixed compile-time 5s) — so it does not link on this platform. CHIP already auto-reconnects on its 5s timer, and the field "never reconnects" symptom is the brownout reboot loop (pre-CHIP) anyway. Ships instead as an observer that timestamps Lost/Established transitions, so a real Wi-Fi drop can be told apart from a brownout reboot when triaging a node. Observer-only; touches no CHIP state.

Version

PROJECT_VER 1.1.7 → 1.1.8 (int 10108), sdkconfig NUMBER/STRING synced.

Verification

Builds + links clean (debug flavour, esp32-lint green, 15% flash free). Not yet flashed to node 35.

…vity log)

Two firmware levers for the node 35 brownout crash-loop at phy_init. Neither
touches the initial phy_init calibration PEAK that trips the reset (only the bulk
cap / custom PCB #11 does) -- these are belt-and-suspenders.

1. CONFIG_ESP_PHY_REDUCE_TX_POWER=y (sdkconfig.defaults, grouped with the brownout
   block). IDF-native: esp_phy_reduce_tx_power() forces the lowest PHY TX power on
   the boot immediately after ESP_RST_BROWNOUT (phy_init.c gates it on exactly that
   reset reason), trimming current on the retry boot. Post-brownout backoff, NOT a
   peak cut.

2. Wi-Fi connectivity-transition logger (app_main.cpp). Originally scoped as a
   runtime reconnect backoff via ConnectivityMgr().SetWiFiStationReconnectInterval,
   but esp-matter's ESP32 ConnectivityManagerImpl DECLARES _SetWiFiStationReconnect-
   Interval without defining it (only _Get links; the interval is a fixed compile-
   time 5s), so that call does not link on this platform. CHIP already auto-
   reconnects on its 5s timer, and the field "never reconnects" symptom is the
   brownout reboot loop (pre-CHIP) anyway. So this ships as an observer that
   timestamps Lost/Established transitions -- lets a real Wi-Fi drop be told apart
   from a brownout reboot when triaging a node. Observer-only; touches no CHIP state.

Bumps PROJECT_VER 1.1.7 -> 1.1.8 (int 10108); sdkconfig NUMBER/STRING synced.
Verified: builds + links clean (debug flavour, 15% flash free). Not yet flashed to
node 35. See #83.

Assisted-by: AI
@AndrewDemsDS
AndrewDemsDS merged commit 20d156c into main Jul 23, 2026
5 checks passed
@AndrewDemsDS
AndrewDemsDS deleted the fix/83-brownout-defense branch July 23, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant